package ru.ibrae.cr.remoteclient;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CustomClassPathXmlApplicationContext
        extends ClassPathXmlApplicationContext {
    //~ Constructors -----------------------------------------------------------

    public CustomClassPathXmlApplicationContext() {
        super();
    }

    public CustomClassPathXmlApplicationContext(ApplicationContext parent) {
        super(parent);
    }

    @SuppressWarnings("unchecked")
    public CustomClassPathXmlApplicationContext(String path, Class clazz)
            throws BeansException {
        super(path, clazz);
    }

    public CustomClassPathXmlApplicationContext(String configLocation)
            throws BeansException {
        super(configLocation);
    }

    public CustomClassPathXmlApplicationContext(String configLocations[],
            ApplicationContext parent)
            throws BeansException {
        super(configLocations, parent);
    }

    public CustomClassPathXmlApplicationContext(String configLocations[],
            boolean refresh,
            ApplicationContext parent)
            throws BeansException {
        super(configLocations, refresh, parent);
    }

    public CustomClassPathXmlApplicationContext(String configLocations[],
            boolean refresh)
            throws BeansException {
        super(configLocations, refresh);
    }

    @SuppressWarnings("unchecked")
    public CustomClassPathXmlApplicationContext(String paths[], Class clazz,
            ApplicationContext parent)
            throws BeansException {
        super(paths, clazz, parent);
    }

    @SuppressWarnings("unchecked")
    public CustomClassPathXmlApplicationContext(String paths[], Class clazz)
            throws BeansException {
        super(paths, clazz);
    }

    public CustomClassPathXmlApplicationContext(String configLocations[])
            throws BeansException {
        super(configLocations);
    }

    //~ Methods ----------------------------------------------------------------
    @Override
    protected void initBeanDefinitionReader(XmlBeanDefinitionReader beanDefinitionReader) {
        super.initBeanDefinitionReader(beanDefinitionReader);
        beanDefinitionReader.setValidationMode(
                XmlBeanDefinitionReader.VALIDATION_NONE);
    }
}
